package me.tuyou.stream;

import me.tuyou.common.MyLogGenerator;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;

public class StreamSourceTest {

    public static void main(String[] args) throws Exception {

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
//        env.readTextFile("file:///Users/tuyou/Downloads/flink cdc.txt").print();
//        env.fromCollection(Arrays.asList(1,2,3,4,5)).print();
//        env.fromElements(1,2,3,4,5).print();
//        env.generateSequence(1, 10).print();
        env.addSource(new MyLogGenerator()).print();
        env.execute("111111");
    }
}
